# filter  -- >  迭代器
# map  -- >  迭代器
# reduce -- > 单值
x = {1:'z',2:'x',3:'y'}
res = filter(lambda x : x in range(1,3),x)

def fun(n,m):
    return x[n]

list_int = map(fun,range(int('1'),int('3')))

for i in res:#  迭代器一次性  迭代完后无值

    print(i,fun(i))



# print(list(res))  #  []
# print(next(res))  #  StopIteration

# 迭代器可用next, for , list
